package com.everyline.baselibrary.fragment;

import androidx.databinding.ViewDataBinding;

import com.everyline.baselibrary.base.BasePresenter;
import com.everyline.baselibrary.base.BaseView;

/**
 * crated by Administrator on 2021/6/7
 * 746608431@qq.com
 * 描述：TODO
 */
abstract public class BasePresenterFragment<V extends ViewDataBinding, T extends BasePresenter> extends BaseDBFragment<V> implements BaseView {
    protected T mPresenter;

    @Override
    protected void initPresenter() {
        if (mPresenter != null) {
            mPresenter.attachView(this);
        }

    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        if (mPresenter != null) {
            mPresenter.detachView();
        }
    }


}
